﻿using Framework.Attributes;
using Framework.Model;

namespace CharacterModel
{
    public class Portrait : IId
    {
        public int Id { get; set; }
        public Feature HeadFeature { get; set; }
        public int HeadColor { get; set; }
        public int HairColor { get; set; }
        public Feature EyeFeature { get; set; }
        public int EyeColor { get; set; }
        public Feature NoseFeature { get; set; }
        public Feature MouthFeature { get; set; }
        public int TeethColor { get; set; }
        public int LipColor { get; set; }

        [Exclude]
        public string FaceIdentifier
        {
            get { return string.Format("{0}{1}{2}_{3}{4}_{5}_{6}{7}",
                HeadFeature.Id,
                HeadColor > 0 ? "|" + HeadColor.ToString("X6") : "",
                HairColor > 0 ? "|" + HairColor.ToString("X6") : "",
                EyeFeature.Id,
                EyeColor > 0 ? "|" + EyeColor.ToString("X6") : "",
                NoseFeature.Id,
                MouthFeature.Id,
                LipColor > 0 ? "|" + LipColor.ToString("X6") : ""); }
        }
    }
}